-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shell script to run kibana tests on cloud via Jenkins #21107
Conversation
I'm confused, how does this know to run things on cloud? |
Hi @spalger it knows to run them on cloud by setting the following env variables, which I plan do as part of elastic-stack-testing framework after provisioning the cloud instance. export TEST_KIBANA_HOSTNAME= export TEST_ES_HOSTNAME= |
Is that something that will happen in this script? |
I am not sure I understand your question, but if you are asking if this script is modified by the elastic-stack-framework, it is not. I will just set the env variables listed and then run this script as is. |
I guess I was confused why the script doesn't include the setup necessary to run on cloud, but is described as the "script to run kibana tests on cloud via Jenkins". I guess it's more a script to run the kibana tests that are compatible with cloud. Would you mind including a comment at the top of this script that explains the dependency this script has on the elastic-stack-testing framework to setup the cloud environment for testing, and that the script will be called with the necessary environment variables preset to run against a cloud env? Alternatively, how would you feel about this script being responsible for setting up the elastic-stack-testing framework? Then I think this script really would be the script that runs the Kibana tests on cloud. Then it would also be more obvious to people looking at this script what steps are necessary to actually run the tests on cloud. I imagine it looking something like this: #!/usr/bin/env bash
set -e
# resolve the path to the root of the Kibana repo
kibanaPath="$(cd "$(dirname $0)/../.."; pwd)"
# check and resolve the path to the root of the elastic-stack-testing repo
git clone [email protected]:elastic/elastic-stack-testing.git "$kibanaPath/../elastic-stack-testing"
estPath="$(cd "$kibanaPath/../elastic-stack-testing"; pwd)"
# setup node/yarn and bootstrap the Kibana repo
source "$kibanaPath/src/dev/ci_setup/setup.sh"
# run the elastic-stack-testing jenkins_build_cloud.sh script with the tests we want to run
"$estPath/jenkins_build_cloud.sh" "xvfb-run node scripts/functional_test_runner --debug --grep @skipcloud --invert" I imagine it won't work exactly like this, but if it worked sort of like this then this scripts reliance to the elastic-stack-testing repo are very clear to anyone trying to understand what we do to run our tests on cloud. |
@spalger yes it's basically to just run kibana tests compatible with cloud, so it makes sense for me to add a comment explaining that for now. On your alternative approach, I am open to exploring other ways. It would be best to setup some discussion time though instead of writing in comments here and trying to explain it all, if that is cool with you :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Happy to discuss the alternative approach sometime if you want to set something up :)
💔 Build Failed |
Awesome Spencer, thanks I will set something up. |
CI failure is unrelated to changes in this PR. |
* Shell script to run kibana tests on cloud via Jenkins * Add comment explaining cloud setup
* Shell script to run kibana tests on cloud via Jenkins * Add comment explaining cloud setup
Shell script to setup and run kibana test on cloud.
Addresses issue #19229